/**
 * Created by lghdb on 2018/7/9.
 */

var http = require("http");

module.exports = {
    get: (path) =>{
        return  new Promise(function (resolve, reject) {
            http.get(path, async (req, res) =>{
                var html='';
                req.on('data',function(data){
                    html+=data;
                });
                req.on('end', function(){
                    resolve({result: true, data: html});
                });
            });
        });
    }
}
